/************************************************************************
                        Reply.h.h 
*/
#ifndef REPLY_H
#define REPLY_H
#include "Object.h"
#include <string>
#include <memory>
#include <iostream>
using namespace std;

//enum of possible reply types
enum REPLY_MESSAGE_TYPE{
		FAIL=0,//unknown error or request execution failed
		LOGIN_SUCCESS=1,//a successfull login reply
		LOGIN_FAILED=2,//a failed login reply
		LOGOUT_SUCCESS=3,//a successfull logout reply
		LOGOUT_FAILED=4,//a failed logout reply
		NO_PERMISSION=5,//user has no permision to run current request
		INVALID_INPUT=6,//invalid data input for current request
		UNKNOWEN_REQUEST=7,//an unknown request reply
		DB_REQUEST_SUCCESS=8,//a request has completed successfully
		DB_REQUEST_FAIL=9
};


/**
  * class Reply
Reply is a simplr reply with no data, only reply type.
 */
class Reply : virtual public Object
{
public:
		// Constructors/Destructors
		Reply (int type);
		virtual ~Reply (){}
		int getReplyType(){return m_replyType;}
		void setReplyType(int type){m_replyType=type;}
		//thease methods exist for polimorphizm
		virtual string getParameter(string column,unsigned int row)const{return "";}
		virtual void addParameter(string column,string data){;}
		virtual string getErrDescription(){return "";}
		virtual void print_recordset();
private:
	Reply ();
	Reply(Reply const &reply);
	Reply &operator=(const Reply &rhs);
	int m_replyType;//the reply type
};
#endif // REPLY_H
